<div class="fly-header layui-bg-black">
	<div class="layui-container">
		<% if(isNotEmpty(site.logo)){ %>
		<a class="fly-logo" href="${ctxFront}">
			<img alt="${site.title}" src="${site.logo}" style="height: 43px;" class="container">
		</a>
		<% }else{ %>
		<a class="fly-logo" style="color: #fff;font-size: 25px;" href="${ctxFront}">${site.title}</a>
		<% } %>
		<ul class="layui-nav fly-nav">
			<li class="layui-nav-item layui-hide-xs <%if(isIndex!false){%>layui-this<%}%>">
				<a href="${ctxFront}/index-${site.id}${@Global.getUrlSuffix()}"><!--<i class="iconfont icon-shouye"></i>${site.id == '1'?'首页':'主页'}-->首页</a>
			</li>

			<%
				for(cate in @CmsUtils.getMainNavList(site.id)){
					if(cateLP.index <= 6){
			%>
			<li class="layui-nav-item layui-hide-xs ${has(category) && (category.id! == cate.id! || strutil.index(category.ids,cate.id) > 1) ? 'layui-this' :'' }">
			<%
						var childList = @CmsUtils.getSubMainNavList(site.id,cate.id);
						if(childList.~size > 0){
			%>
							<a href="javascript:;"><i class="iconfont layui-icon-spread-left"></i>${cate.name}</a>
							<dl class="layui-nav-child">
			<%
							for(cc in childList){
								if(cc.inMenu==@Global.YES){
			%>
							<dd class="<%if(has(category) && (category.id! == cc.id! || strutil.index(category.ids,cc.id) > 1)){%>layui-this<%}%>">
								<a href="${cc.url}"><!--<i class="iconfont icon-iconmingxinganli"></i>-->${cc.name}</a>
							</dd>
			<%
								}
							}
			%>
							</dl>
			<%
						}else{
			%>
						<a href="${cate.url}" target="${cate.target}"><!--<i class="iconfont icon-iconmingxinganli"></i>-->${cate.name}</a>
			<%			}%>
			</li>
			<%	}}%>

		</ul>

		<ul class="layui-nav fly-nav-user">
			<% var user = @UserUtils.getUser(); if(isEmpty(user.id)){%>
			<!-- 未登入的状态 -->
			<li class="layui-nav-item layui-hide-lg layui-hide-md layui-hide-sm">
				<a class="iconfont icon-touxiang " href="${ctxFront}/login-${site.id}.html"></a>
			</li>
			<li class="layui-nav-item layui-hide-xs">
				<a class="iconfont icon-touxiang layui-hide-xs" href="${ctxFront}/login-${site.id}.html"></a>
			</li>
			<li class="layui-nav-item  layui-hide-xs">
				<a href="${ctxFront}/login-${site.id}.html">登录</a>
			</li>
			<li class="layui-nav-item layui-hide-xs">
				<a href="${ctxFront}/reg-${site.id}.html">注册</a>
			</li>
			<% }else{ %>
			<!-- 登入后的状态 -->
			<li class="layui-nav-item">
				<a class="fly-nav-avatar" href="javascript:;">
					<% if(isEmpty(user.photo)){ %>
					<img src="${ctxPath}/static/images/default.png">
					<% }else{ %>
					<img src="${user.photo}">
					<% } %>
					<cite class="layui-hide-xs">&nbsp;${user.name}</cite>
				</a>
				<dl class="layui-nav-child">
					<dd><a href="${ctxFront}/set-${site.id}.html"><i class="layui-icon">&#xe620;</i>我的资料</a></dd>
					<hr style="margin: 5px 0;">
					<dd><a href="${ctx}/logout" style="text-align: center;">退出</a></dd>
				</dl>
			</li>
			<% } %>
		</ul>

	</div>
</div>